home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cxl41.arc
/
CXLQREF.DOC
< prev
next >
Wrap
Text File
|
1989-03-05
|
18KB
|
781 lines
CXL Quick Reference
-------------------
CXLDEF.H - Miscellaneous Functions
-------------------------------------
void beep(void);
sounds a beep in the speaker
char *biosver(void);
returns the BIOS version date
int clockcal(void);
determines if a clock-calendar board is installed
void delay_(unsigned duration);
delays program execution for a specified time period
unsigned expmem(void);
determines the amount (if any) of expanded memory on the system
unsigned extmem(void);
determines the amount of extended memory on an AT machine
int gameport(void);
determines if a game port is installed
int machid(void);
returns the value of the machine ROM ID byte
int mathchip(void);
determines if a math coprocessor is installed
int numflop(void);
returns the number of floppy disk drives installed
int numpar(void);
returns the number of parallel ports
int numser(void);
returns the number of serial ports installed
void sound_(unsigned pitch,unsigned duration);
sounds a tone in the speaker for specified pitch and duration
char *sysdate(int dtype);
returns a string containing the system date
char *systime(int ttype);
returns a string containing the system time
int tabstop(int col,int tabwidth);
calculates a tab stop from given column and tab width
unsigned long timer(void);
returns the value of the BIOS timer
1
CXLEMS.H - EMS Functions
---------------------------
int emsalloc(int numpages);
allocates pages of EMS memory
int emsdealloc(int handle);
deallocates previously allocated pages of EMS memory
int emsexist(void);
determines if the EMS device driver is loaded.
unsigned emsframe(void);
returns the EMS page frame base address
unsigned emsfree(void);
returns the number of free EMS pages (16K blocks)
int emsmap(int handle,int lpage,int ppage);
maps a logical EMS page onto a physical page address
int emsread(char *dest,unsigned emsofs,unsigned numbytes);
reads bytes from an EMS page(s)
unsigned emstotal(void);
returns the total number of EMS pages (16K blocks) on the system
char *emsver(void);
returns the current EMS version
int emswrite(char *src,unsigned emsofs,unsigned numbytes);
writes bytes to an EMS page(s)
unsigned expmem(void);
determines the amount (if any) of expanded memory on the system
2
CXLKEY.H - Keyboard Functions
--------------------------------
void capsoff(void);
toggles the CapsLock key off
void capson(void);
toggles the CapsLock key on
void clearkeys(void);
clears the keyboard buffer
int getchf(char *valid,int defchar);
gets a character from the keyboard from a list of valid characters
int getns(char *str,int max);
inputs a string of specified length from the keyboard
unsigned getxch(void);
gets a key (ASCII code/extended ASCII code) from the keyboard
int inputsf(char *str,char *fmt);
inputs a formatted string from the keyboard
unsigned kbstat(void);
returns the status of the keyboard control keys
void numoff(void);
toggles the NumLock key off
void numon(void);
toggles the NumLock key on
void setkbloop( void (*func) (void));
sets a procedure to be called while waiting for a keypress
int setonkey(unsigned keycode,void (*func) (void),int pass);
attaches a keypress to a function call, used by CXL input functions
int waitkey(void);
halts execution until a key is pressed
int waitkeyt(int duration);
halts execution until a key is pressed or specified time expires
3
CXLMOU.H - Microsoft Mouse Functions
---------------------------------------
void msbpress(int button,int *bstat,int *bcount,int *x,int *y);
gets info about specific button presses of mouse
void msbreles(int button,int *bstat,int *bcount,int *x,int *y);
gets info about specific button releases of mouse
void mscursor(int curtype,int smask,int cmask);
sets the mouse cursor mode
void msgotoxy(int x,int y);
sets the mouse coordinates
void mshbounds(int left,int right);
sets the mouse horizontal bounds
void mshidecur(void);
hides the mouse cursor
int msinit(void);
initializes mouse/determines if present
void msmotion(int *xcount,int *ycount);
gets info about movement of mouse
void msshowcur(void);
reveals the mouse cursor
void msspeed(int xratio,int yratio);
adjusts the mouse sensitivity
void msstatus(int *bstat,int *x,int *y);
gets the mouse status
void msvbounds(int top,int bottom);
sets the mouse vertical bounds
4
CXLPRN.H - Printer Functions
-------------------------------
void lcrlf(void);
prints a carriage return and line feed on the printer
void lprintc(int ch);
prints a character on the printer
void lprintf(const char *format,...);
sends formatted output to the printer
void lprintns(char *str,int width);
prints a string on the printer, formatting width
void lprints(char *str);
prints a string on the printer
void lprintsb(char *str,int reps);
prints a bold-faced string on the printer
void lprintsu(char *str);
prints an underlined string on the printer
void scrndump(void);
dumps the current screen to the printer
5
CXLSTR.H - String and Character Functions
--------------------------------------------
int cvaltype(int ch,int ctype);
tests a character with a CXL character type code, checking validity
int strblank(char *str);
determines if a given string is blank (whitespace)
char *strbmatch(char *str,char *strarr[]);
returns the best match of a string in an array of strings
int strchg(char *str,int oldch,int newch);
changes all matching characters in a string to another
char *strcode(char *str,char *key);
encodes/decodes a string
char *strdel(char *substr,char *str);
deletes a substring from within a string
int strichg(char *str,int oldch,int newch);
changes all matching characters in a string to another, ignores case
char *stridel(char *substr,char *str);
deletes a substring from within a string, ignores case
char *striinc(char *str1,char *str2);
determines if one string is included in another, ignores case
char *strinc(char *str1,char *str2);
determines if one string is included in another
char *strins(char *instr,char **str,int st_pos);
inserts one string into another
int striocc(char *str,int ch);
returns number of occurrences of a character in a string, ignores case
char *strleft(char *str,int num_chars);
returns a new substring from the left of a string
char *strltrim(char *str);
trims leading spaces from a string
int strmatch(char *str1,char *str2);
compares 2 strings, returns a match score
char *strmid(char *str,int st_pos,int num_chars);
returns a new substring from the middle of a string
int strocc(char *str,int ch);
returns the number of occurrences of a character in a string
char *strright(char *str,int num_chars);
6
returns a new substring from the right of a string
char *strrol(char *str,int count);
rotates a string specified number of characters left
char *strror(char *str,int count);
rotates a string specified number of characters right
char *strsetsz(char **str,int newsize);
adjusts the length of a string by truncation or padding with spaces
char *strshl(char *str,int count);
shifts a string specified number of characters left
char *strshr(char *str,int count);
shifts a string specified number of characters right
char *strtrim(char *str);
trims trialing spaces from a string
char *struplow(char *str);
converts a string to mixed upper and lower case characters
int touplow(char *str,char *pos,int ch);
converts character to upper/lower case depending on previous character
7
CXLVID.H - Video and Screen Functions
----------------------------------------
int attrib(int fore,int back,int bright,int blink);
creates an attribute
void box_(int srow,int scol,int erow,int ecol,int btype,int attr);
displays a text box on the screen
void clreol_(void);
clears to the end of line
void clrscrn(void);
clears the screen and homes the cursor
void clrwin(srow,scol,erow,ecol);
clears a window of the screen
int disktoscrn(char *fname);
copies a saved screen disk file to screen
void fill_(int srow,int scol,int erow,int ecol,int ch,int attr);
fills in a region of the screen with specified character/attribute
void gotoxy_(int row,int col);
sets cursor coordinates on the screen
void mode(int mode_code);
sets the video mode
void printc(int row,int col,int attr,int ch);
prints a character to the screen at specified location and attribute
void prints(int row,int col,int attr,char *str);
displays a string on the screen at specified location and attribute
void putchat(int ch,int attr);
puts a character/attribute at cursor position
unsigned readchat(void);
reads the character and attribute under the cursor
void readcur(int *row,int *col);
reads the current cursor location
void revattr(int count);
reverses the attribute of one or more characters at cursor
int scrntodisk(char *fname);
copies the current screen to a disk file
void setattr(int attr,int count);
sets the attribute of one or more characters at cursor
void setcursz(int sline,int eline);
8
sets the cursor size
int setlines(int numlines);
sets the number of lines on the display
void spc(int num);
displays a specified number of spaces to the screen
void srestore(int *sbuf);
restores a previously saved screen
int *ssave(void);
saves the current screen to a buffer
void videoinit(void);
initializes CXL's video system to the present video setup
int vidtype(void);
returns the video display adapter type
9
CXLWIN.H - Windowing Functions
---------------------------------
int attrib(int fore,int back,int bright,int blink);
creates an attribute
int disktowin(char *fname);
copies a saved window disk file to screen
int vidtype(void);
returns the video display adapter type
int wactiv(WINDOW whandle);
activates an already opened window
int wblocked(WINDOW whandle);
determines if a window is being blocked by any other windows
int wborder(int btype);
changes the active window's border box type
int wbox(int wsrow,int wscol,int werow,int wecol,int btype,int attr);
displays a text box in active window
int wcclear(int attr);
clears the active window using specified attribute
int wcenters(int wrow,int attr,char *str);
displays a string centered in active window
int wchgattr(int battr,int wattr);
changes attribute of the active window
int wclear(void);
clears the active window
int wclose(void);
closes the active window
int wcloseall(void);
closes all open windows
int wclreol(void);
clears to the end of the active window's line
int wclreos(void);
clears from cursor position to the end of the active window
WINDOW wcopy(int nsrow,int nscol);
creates a new window, duplicating the active window
int wdelline(int row,int direc);
deletes a line in active window
int wdupc(int ch,int count);
10
displays a character a specified number of times in active window
char *werrmsg(void);
returns an error message from the last windowing function
int wfill(int wsrow,int wscol,int werow,int wecol,int ch,int attr);
fills a region in active window with specified character and attribute
struct _wrec_t *wfindrec(WINDOW whandle);
finds address of window record of specified window handle
int wgetc(void);
gets a character from the keyboard within the active window
int wgetchf(char *valid,int defchar);
gets a character from the keyboard within the active window
int wgetns(char *str,int maxlen);
gets a string from keyboard within active window, limits length of input
int wgets(char *str);
gets a string from the keyboard within the active window
int wgotoxy(int wrow,int wcol);
plots cursor coordinates within the active window
WINDOW whandle(void);
returns the handle of the active window
int whide(void);
hides the active window
int whline(int wsrow,int wscol,int count,int btype);
draws a horizontal text line in active window
int winpdef(int wrow,int wcol,char *str,char *format,int fconv,
int fattr,int update,int (*validate) (char *));
defines an area of the active window for keyboard input
int winpread(void);
processes keyboard input of all defined areas of active window
int winputsf(char *str,char *fmt);
inputs a formatted string from the keyboard within a window
int winsline(int row,int direc);
inserts a line in active window
int wintodisk(int srow,int scol,int erow,int ecol,char *fname);
copies a window of the screen to a disk file
int wisactiv(WINDOW whandle);
determines if specified window handle is active
int wmenudef(int wrow,int wcol,int attr,char *str,int tagchar,
int tagattr,char *desc);
defines a window bar-selection menu option
11
int wmenuget(int barattr,int taginit,int pulldown);
gets a window bar-selection menu selection from the keyboard
int wmessage(char *str,int border,int leftofs,int attr);
displays text on the top or bottom border of active window
int wmove(int nsrow,int nscol);
moves the active window to a new location
WINDOW wopen(int srow,int scol,int erow,int ecol,int btype,int battr,
int wattr);
opens a screen window and makes it active
int wperror(char *message);
displays an error message window, waits for a keypress, then returns
int wpgotoxy(int wrow,int wcol);
plots pseudo cursor coordinates within the active window
int wprintc(int row,int col,int attr,int ch);
prints a character in the active window, does not adjust cursor position
int wprintf(const char *format,...);
outputs a formatted string to active window, works like printf() does
int wprints(int row,int col,int attr,char *str);
prints a string in the active window, does not adjust cursor position
int wputc(int ch);
prints a character in the active window at current cursor location
int wputns(char *str,int width);
prints a string in the active window, formats width of output
int wputs(char *str);
prints a string in the active window at the current cursor location
void wrestore(int *wbuf);
restores a previously saved window of screen memory
int wrjusts(int wrow,int wjcol,int attr,char *str);
displays a string right justified to specified column in active window
int *wsave(int srow,int scol,int erow,int ecol);
saves a window of screen memory
int wsbounds(int wssrow,int wsscol,int wserow,int wsecol);
sets active window's scroll boundaries
int wscanf(const char *format,...); /* for Turbo C only */
inputs a formatted string from the keyboard, works like scanf() does
int wscroll(int count,int direc);
scrolls text within the active window, up or down
int wsetesc(int option);
12
turns Escape checking for several window input functions on/off
int wsize(int nerow,int necol);
adjusts the size of the active window
int wsseldef(char *str);
defines a window string selection record
char *wsselget(int attr);
gets a window string selection from the keyboard
int wtextattr(int attr);
sets the default text attribute of the active window
int wtitle(char *str,int tpos,int tattr);
gives active window a title
int wunhide(WINDOW whandle);
unhides a previously hidden window
int wvline(int wsrow,int wscol,int count,int btype);
draws a vertical text line in active window
13